<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="sec"
	uri="http://www.springframework.org/security/tags"%>

<%-- Enum constants--%>
<c:set var="EMainMenuItemName_HOME" value="HOME" />
<c:set var="EMainMenuItemName_CLOTHING_MAN" value="CLOTHING_MAN" />
<c:set var="EMainMenuItemName_CLOTHING_WOMAN" value="CLOTHING_WOMAN" />
<c:set var="EMainMenuItemName_CLOTHING_BOY" value="CLOTHING_BOY" />
<c:set var="EMainMenuItemName_CLOTHING_GIRL" value="CLOTHING_GIRL" />
<c:set var="EMainMenuItemName_BODY_CARE" value="BODY_CARE" />
<c:set var="EMainMenuItemName_ACCESSORIES" value="ACCESSORIES" />
<c:set var="EMainMenuItemName_CONTACT" value="CONTACT" />
<c:set var="EMainMenuItemName_BOOK" value="BOOK" />

<%-- Some values --%>
<c:set var="selectedItemClass" value="sel" />
<c:set var="firstItemClass" value="first" />
<c:set var="selectedMainMenuItemName"
	value="${not empty overrideMainMenuItemName ? overrideMainMenuItemName : mainMenuItemName}" />

<%-- The menu --%>
<ul id="main-menu">

	<%-- Whether a menu item has already been added to the menu --%>
	<c:set var="isFirstLiSet" value="${false}" />

	<li	class="${not isFirstLiSet ? firstItemClass : ''}
     		${selectedMainMenuItemName == EMainMenuItemName_HOME ? selectedItemClass : ''}">
	<a href='<c:url value="/customer/home.do"/>'> <spring:theme code='tab.name.home' /> </a></li>
	<c:set var="isFirstLiSet" value="${true}" />

	<li	class="${not isFirstLiSet ? firstItemClass : ''}
     		${selectedMainMenuItemName == EMainMenuItemName_CLOTHING_MAN ? selectedItemClass : ''}">
	<a href='<c:url value="/customer/products/man/clothing-man.do"/>'> <spring:theme code='tab.name.clothing.men' /> </a></li>
	<c:set var="isFirstLiSet" value="${true}" />

	<li	class="${not isFirstLiSet ? firstItemClass : ''}
     		${selectedMainMenuItemName == EMainMenuItemName_CLOTHING_WOMAN ? selectedItemClass : ''}">
	<a href='<c:url value="/customer/products/woman/clothing-woman.do"/>'> <spring:theme code='tab.name.clothing.women' /> </a></li>
	<c:set var="isFirstLiSet" value="${true}" />

	<li	class="${not isFirstLiSet ? firstItemClass : ''}
     		${selectedMainMenuItemName == EMainMenuItemName_CLOTHING_BOY ? selectedItemClass : ''}">
	<a href='<c:url value="/customer/products/boy/clothing-boy.do"/>'> <spring:theme code='tab.name.clothing.boy' /> </a></li>
	<c:set var="isFirstLiSet" value="${true}" />

	<li	class="${not isFirstLiSet ? firstItemClass : ''}
     		${selectedMainMenuItemName == EMainMenuItemName_CLOTHING_GIRL ? selectedItemClass : ''}">
	<a href='<c:url value="/customer/products/girl/clothing-girl.do"/>'> <spring:theme code='tab.name.clothing.girl' /> </a></li>
	<c:set var="isFirstLiSet" value="${true}" />

	<li	class="${not isFirstLiSet ? firstItemClass : ''}
     		${selectedMainMenuItemName == EMainMenuItemName_BODY_CARE ? selectedItemClass : ''}">
	<a href='<c:url value="/customer/products/bodycare.do"/>'> <spring:theme code='tab.name.body.care' /> </a></li>
	<c:set var="isFirstLiSet" value="${true}" />

	<li	class="${not isFirstLiSet ? firstItemClass : ''}
     		${selectedMainMenuItemName == EMainMenuItemName_BOOK ? selectedItemClass : ''}">
	<a href='<c:url value="/customer/products/book.do"/>'> <spring:theme code='tab.name.book' /> </a></li>
	<c:set var="isFirstLiSet" value="${true}" />

		<li	class="${not isFirstLiSet ? firstItemClass : ''}
     		${selectedMainMenuItemName == EMainMenuItemName_ACCESSORIES ? selectedItemClass : ''}">
	<a href='<c:url value="/customer/products/accessories.do"/>'> <spring:theme code='tab.name.accessories' /> </a></li>
	<c:set var="isFirstLiSet" value="${true}" />

	<li	class="${not isFirstLiSet ? firstItemClass : ''}
     		${selectedMainMenuItemName == EMainMenuItemName_CONTACT ? selectedItemClass : ''}">
	<a href='<c:url value="/customer/contactus.do"/>'> <spring:theme code='tab.name.contact' /> </a></li>
	<c:set var="isFirstLiSet" value="${true}" />

</ul>
